#pragma once

#include "rtpsession.h"
#include "rtcpapppacket.h"
#include "rtpsourcedata.h"

#define MAX_RTP_PKT_LENGTH 1360
#define H264               96

bool CheckError(int rtperr);


using namespace jrtplib;
using namespace jthread;

class CRtpSender :
	public RTPSession
{
public:
	CRtpSender(void);
	~CRtpSender(void);

protected:
	void OnAPPPacket(RTCPAPPPacket* apppacket, const RTPTime& receivetime, const RTPAddress* senderaddress);
	void OnBYEPacket(RTPSourceData* srcdat);
	void OnBYETimeout(RTPSourceData* srcdat);
public:
	void SendH264Nalu(unsigned char* m_h264Buf, int buflen);
	void SetParamsForSendingH264();
};
